package com.rainng.coursesystem.model;

import javax.persistence.*;
import java.util.UUID;

@Entity
@Table(name = "favourites")
public class FavouriteItem{

    @Column(name = "s_number", length = 12, nullable = true)
    private String sNumber;

    @Column(name = "t_number", length = 12, nullable = true)
    private String tNumber;

    @Id
    @Column(name = "file_id", length = 16, columnDefinition = "binary(16)")
    private UUID fileId;

    @Column(name = "file_name")
    private String fileName;

    @Column(name = "file_data")
    private String fileData;

    @Column(name = "is_public")
    private boolean isPublic;

    @Column(name = "likes_count")
    private Integer likesCount;

    public FavouriteItem() {
    }

    public FavouriteItem(String sNumber, String tNumber, UUID fileId, boolean isPublic) {
        this.sNumber = sNumber;
        this.tNumber = tNumber;
        this.fileId = fileId;
        this.isPublic = isPublic;
    }

    public FavouriteItem(String sNumber, String tNumber, UUID fileId, String fileName, String fileData, boolean isPublic) {
        this.sNumber = sNumber;
        this.tNumber = tNumber;
        this.fileId = fileId;
        this.fileName = fileName;
        this.fileData = fileData;
        this.isPublic = isPublic;
    }

    public String getsNumber() {
        return sNumber;
    }

    public void setsNumber(String sNumber) {
        this.sNumber = sNumber;
    }

    public String gettNumber() {
        return tNumber;
    }

    public void settNumber(String tNumber) {
        this.tNumber = tNumber;
    }

    public UUID getFileId() {
        return fileId;
    }

    public void setFileId(UUID fileId) {
        this.fileId = fileId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileData() {
        return fileData;
    }

    public void setFileData(String fileData) {
        this.fileData = fileData;
    }

    public boolean isPublic() {
        return isPublic;
    }

    public void setIsPublic(boolean isPublic) {
        this.isPublic = isPublic;
    }

    public int getLikesCount() {
        return likesCount;
    }

    public void setLikesCount(int likesCount) {
        this.likesCount = likesCount;
    }
}